#include "OptionsArgs.h"

namespace helper {
namespace demo {

OptionsArgs OptionsArgs::create(const DBOptions & database, const ReadOptions & read
  , const WriteOptions & write, const ColumnFamilyOptions & cf
){
  return OptionsArgs(database, read, write, cf);
}

OptionsArgs::OptionsArgs()
  : OptionsArgs(DBOptions(), ReadOptions(), WriteOptions(), ColumnFamilyOptions())
{}

OptionsArgs::OptionsArgs(const DBOptions & database, const ReadOptions & read, const WriteOptions & write, const ColumnFamilyOptions & cf) 
  : read_(read), write_(write), options_(database, cf), database_(options_), columnFamily_(options_)
{
}

OptionsArgs::OptionsArgs(const OptionsArgs & optArgs) 
: OptionsArgs(optArgs.database(), optArgs.read(), optArgs.write(), optArgs.columnFamily())
{
}

OptionsArgs::~OptionsArgs(){}

const ReadOptions & OptionsArgs::read() const {
  return read_;
}
ReadOptions & OptionsArgs::read() {
  return read_;
}

const WriteOptions & OptionsArgs::write() const {
  return write_;
}
WriteOptions & OptionsArgs::write() {
  return write_;
}


const ColumnFamilyOptions & OptionsArgs::columnFamily() const {
  return columnFamily_;
}
ColumnFamilyOptions & OptionsArgs::columnFamily() {
  return columnFamily_;
}

const DBOptions & OptionsArgs::database() const {
  return database_;
}
DBOptions & OptionsArgs::database() {
  return database_;
}

const Options & OptionsArgs::open() const {
  return options_;
}
Options & OptionsArgs::open() {
  return options_;
}

}//namespace demo
}//namespace helper
